package com.hong.drive.server;

import com.hong.drive.core.constants.CloudDriveConstants;
import com.hong.drive.core.response.R;
import com.hong.drive.server.common.stream.channel.DriveChannels;
import io.swagger.annotations.Api;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

import javax.validation.constraints.NotBlank;

/**
 * 描述：CloudDrive服务端启动类
 */
@SpringBootApplication(scanBasePackages = CloudDriveConstants.BASE_COMPONENT_SCAN_PATH)
@ServletComponentScan(basePackages = CloudDriveConstants.BASE_COMPONENT_SCAN_PATH)
@EnableTransactionManagement
@MapperScan(basePackages = CloudDriveConstants.BASE_COMPONENT_SCAN_PATH + ".server.modules.**.mapper")
@EnableAsync
@EnableBinding(DriveChannels.class)
public class CloudDriveServerLauncher {
    public static void main(String[] args) {
        SpringApplication.run(CloudDriveServerLauncher.class, args);
    }
}
